<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/6/25 0025
 * Time: 14:22
 */

namespace app\jointly\controller;

use AlibabaCloud\Client\AlibabaCloud;
use AlibabaCloud\Client\Exception\ClientException;
use AlibabaCloud\Client\Exception\ServerException;
use think\Db;
class Sms extends Base
{
    public static function Send($phone,$code){
      	$res = new Base();
        $url = 'http://47.108.20.104/public/index.php/Sms?phone='.$phone.'&code='.$code;
        $ref  = $res->cUrl($url);
        if($ref != 'OK'){
            $set = ['time'=>time(),'content'=>$ref,'desc'=>$code];
            Db::name('log')->insert($set);
        }
        return $ref;
    }
}